fix: add Spotless skip flags to Maven and Gradle validation#1946
fix: add Spotless skip flags to Maven and Gradle validation#1946mashraf-222 wants to merge 2 commits intomainfrom
Conversation
Instrumented test files fail Spotless format checks on projects like Apache Flink, Kafka, and Beam. Adds -Dspotless.check.skip=true and -Dspotless.apply.skip=true to Maven, and spotlessCheck/Apply/Java/ Kotlin/Scala task disabling to the Gradle init script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @mashraf-222's task in 2m 28s —— View job PR Review SummaryChecklist
Prek ChecksAll clean — ruff check, ruff format passed with no issues. Code ReviewMaven ( Gradle ( Potential gap — POM injection path is incomplete
Additionally, Tests: The three new tests are correct and cover the additions well. One note: Duplicate DetectionNo duplicates detected. The Gradle and Maven skip lists are intentionally parallel (not shared), since they use completely different build tool conventions. Last updated: 2026-04-06 |
Problem
Instrumented test files (
*__perfinstrumented.java) fail Spotless Maven/Gradle format checks. The validation skip flag lists did not include Spotless, causing build failures on projects like Apache Flink (Spotless 2.43.0), Kafka, and Beam.Root Cause
_MAVEN_VALIDATION_SKIP_FLAGSinmaven_strategy.pyand_GRADLE_SKIP_VALIDATION_INIT_SCRIPTingradle_strategy.pywere missing Spotless entries. They already skipped rat, checkstyle, spotbugs, pmd, enforcer, japicmp, and errorprone — but not Spotless.Fix
Maven: Added
-Dspotless.check.skip=trueand-Dspotless.apply.skip=trueto_MAVEN_VALIDATION_SKIP_FLAGS.Gradle: Added
spotlessCheck,spotlessApply,spotlessJava,spotlessKotlin,spotlessScalato the task disable list in the init script.Validation
Verified flag works on Apache Flink:
Test Coverage
test_maven_skip_flags_include_spotless— verifies both Spotless flags presenttest_maven_skip_flags_include_all_known_plugins— verifies all plugin families coveredtest_gradle_skip_script_includes_spotless— verifies Gradle script disables Spotless tasksCloses CF-1080